import { http } from './request'
import type { BodyOptions, QueryOptions } from './global.d'

export const Apis = {
  szbt: {
    populationQyData: {
      get_getNewestData: (data?: QueryOptions) =>
        http.get('/szbt/populationQyData/getNewestData', data),
      get_getChartData: (params: any) => http.get('/szbt/populationQyData/getChartData', params),
    },
    populationData: {
      get_getNewestData: (data?: QueryOptions) =>
        http.get('/szbt/populationData/getNewestData', data),
      get_getChartData: (data?: QueryOptions) =>
        http.get('/szbt/populationData/getChartData', data),
      get_getNewestJczData: (data?: QueryOptions) =>
        http.get('/szbt/populationData/getJczNewestData', data),
      get_getChartJczData: (data?: QueryOptions) =>
        http.get('/szbt/populationData/getChartDataJcz', data),
    },
    railway: {
      get_getNewestData: (data?: QueryOptions) => http.get('/szbt/railway/getNewestData', data),
      get_getChartData: (data?: QueryOptions) => http.get('/szbt/railway/getChartData', data),
      get_list: (data?: QueryOptions) => http.get('/szbt/railway/list', data),
    },
    gasSurvey: {
      get_getNewestData: (data?: QueryOptions) => http.get('/szbt/gasSurvey/getNewestData', data),
      get_getChartData: (data?: QueryOptions) => http.get('/szbt/gasSurvey/getChartData', data),
      get_list: (data?: QueryOptions) => http.get('/szbt/gasSurvey/list', data),
    },
    highwayTransportData: {
      get_getNewestData: (data?: QueryOptions) =>
        http.get('/szbt/highwayTransportData/getNewestData', data),
      get_getChartData: (data?: QueryOptions) =>
        http.get('/szbt/highwayTransportData/getChartData', data),
      get_list: (data?: QueryOptions) => http.get('/szbt/highwayTransportData/list', data),
    },
    aviationTransportData: {
      get_getNewestData: (data?: QueryOptions) =>
        http.get('/szbt/aviationTransportData/getNewestData', data),
      get_getChartData: (data?: QueryOptions) =>
        http.get('/szbt/aviationTransportData/getChartData', data),
      get_list: (data?: QueryOptions) => http.get('/szbt/aviationTransportData/list', data),
    },
    postData: {
      get_getNewestData: (data?: QueryOptions) => http.get('/szbt/postData/getNewestData', data),
      get_getChartData: (data?: QueryOptions) => http.get('/szbt/postData/getChartData', data),
      get_list: (data?: QueryOptions) => http.get('/szbt/postData/list', data),
    },
    capitalFlowData: {
      get_getNewestData: (data?: QueryOptions) =>
        http.get('/szbt/capitalFlowData/getNewestData', data),
      get_getChartData: (data?: QueryOptions) =>
        http.get('/szbt/capitalFlowData/getChartData', data),
      get_list: (data?: QueryOptions) => http.get('/szbt/capitalFlowData/list', data),
    },
    newBorn: {
      /** 根据年份和季度获取按新生儿区域占比饼状图数据 */
      get_getNewBorTjChartInfo: (data?: QueryOptions) =>
        http.get('/szbt/newBorn/getNewBorTjChartInfo', data),
      /** 根据年份和季度获取按新生儿区域占比饼状图数据 */
      get_selectNewBornQyzb: (data?: QueryOptions) =>
        http.get('/szbt/newBorn/selectNewBornQyzb', data),
      /** 获取最新新生儿数据时间 */
      get_getNewBornNewestData: (data?: QueryOptions) =>
        http.get('/szbt/newBorn/getNewBornNewestData', data),
    },
    signal: {
      /** 获取通信最新数据的日期 */
      get_getNewestData: (data?: QueryOptions) => http.get('/szbt/signal/getNewestData', data),
      /** 获取通信图表数据 */
      get_getChartData: (data?: QueryOptions) => http.get('/szbt/signal/getChartData', data),
    },
    pupil: {
      /** 获取最新数据的日期 */
      get_getNewestData: (data?: QueryOptions) => http.get('/szbt/pupil/getNewestData', data),
      /** 获取在读小学生统计图表数据 */
      get_getPupilStatisticsChartData: (data?: QueryOptions) =>
        http.get('/szbt/pupil/getPupilStatisticsChartData', data),
    },

    land: {
      /** 获取最新数据的日期 */
      get_getNewestData: (data?: QueryOptions) => http.get('/szbt/land/getNewestData', data),
      /** 获取客运量图表数据 */
      get_getAllKylChartData: (data?: QueryOptions) =>
        http.get('/szbt/land/getAllKylChartData', data),
      /** 获取图表数据 */
      get_getChartData: (data?: QueryOptions) => http.get('/szbt/land/getChartData', data),
    },
    aviation: {
      /** 获取航空列表数据 */
      get_list: (data?: QueryOptions) => http.get('/szbt/aviation/list', data),
      /** 获取最新数据的日期 */
      get_getNewestData: (data?: QueryOptions) => http.get('/szbt/aviation/getNewestData', data),
      /** 获取航空图表数据 */
      get_getAviationChartData: (data?: QueryOptions) =>
        http.get('/szbt/aviation/getAviationChartData', data),
      /** 获取航空图表数据 */
      get_getAviationChartDataYear: (data?: QueryOptions) =>
        http.get('/szbt/aviation/getAviationChartDataYear', data),
    },

    powerSurvey: {
      /** 获取电力最新数据的日期 */
      get_getNewestData: (data?: QueryOptions) => http.get('/szbt/powerSurvey/getNewestData', data),
      /** 根据年月获取电力图表数据 */
      get_getChartData: (data?: QueryOptions) => http.get('/szbt/powerSurvey/getChartData', data),
      /** 获取电力列表数据 */
      get_list: (data?: QueryOptions) => http.get('/szbt/powerSurvey/list', data),
    },
  },
}
